(abort "This installer script needs to use the ARexx utility rx.\n\nPlease make sure the rx utility is installed in sys:rexxc and try to install again."))
; make sure we have the library that EditTextFile.rexx needs
(if (not (exists "libs:rexxsupport.library"))
(abort "This installer script needs rexxsupport.library in LIBS: to run.\n\nPlease install this library and then run this Installer script again."))
; try and make sure ARexx is running
(run "rexxmast" (safe))
; if AmiPhoned is already in /serv, probably they've already installed before
(help "To send speech with AmiPhone, you need an audio digitizer connected to your parallel port. If your digitizer model is not listed, please choose the Generic option.")
)
)
(select Digitizer
(set Digitizer "DSS8")
(set Digitizer "PERFECTSOUND")
(set Digitizer "AMAS")
(set Digitizer "TOCCATA")
(set Digitizer "AURA")
(set Digitizer "SOUNDMAGIC")
(set Digitizer "DELFINA")
(set Digitizer "AHI")
(set Digitizer "GENERIC")
)
(tooltype
(dest "AmiPhone")
(settooltype "SAMPLER" Digitizer)
)
; do they want to set up AmiPhone to receive voice-mail?
(if (= 1 (askbool
(prompt "\n\nDo you wish to set up AmiPhone to receive voice mail?")
(help "AmiPhone is capable of receiving and storing voice messages while you are away from your computer. This takes some disk space though, so if you're tight on space, you might want to leave it disabled.")
(default 0)
(choices "Yes" "No")))
; answered yes
(
(set MessageDir
(askdir
(prompt "What directory would you like AmiPhone to keep the voice message files in? (NOTE: You should not keep any other files in this directory!)")
(help @askdir-help)
(default "work:")))
(set MaxDirSize
(asknumber
(prompt "\n\nWhat should be the maximum possible size (in kilobytes) of this directory be? (Enter -1 for unlimited size)")
(help "By setting this value, you can guarantee that AmiPhoned will not let anyone fill up your hard drive. AmiPhoned counts the bytes in the voice mail directory on startup, and will reject messages if the directory size has reached the size you specify here.")
(default 500)
(range -1 1000000)))
; if a max size was set for the dir, use that as the max max file size as well
(if (> MaxDirSize -1)
(set MaxFileSize MaxDirSize)
(set MaxFileSize 1000000))
(set MaxFileSize
(asknumber
(prompt "\n\nWhat should the maximum possible size (in kilobytes) of each message be? (Enter -1 to impose no special limit on individual message size)")
(help "By setting this value, you can guarantee that no one message will fill up your entire allotment of message space.")
(default -1)
(range -1 MaxFileSize)))
(set AwayVar
(askstring
(prompt "\n\nAmiPhone uses the presence of an ENV: var to determine whether or not you're away. If the ENV: var is present, it takes a message, otherwise it puts up a requester for you. What ENV: var would you like AmiPhone to look for?")
(help "The ENV: var can be set manually by you, by a script, or perhaps by your screen blanker.")
(prompt "If you plan to be running AmiPhone in conjunction with AmiTCP, the line:\n\nAmiPhone 2956/tcp\n\nneeds to be present in your amitcp:db/services file. Do you wish me to update the file? (Note: AmiPhone will not receive connections if this line is not precisely as shown above!)")
(help "The inclusion of this line into amitcp:db/services is done by an ARexx script which is smart enough to correctly edit previous installations. Also it will make a backup (to amitcp:db/services.bak) before writing.")
(confirm)
)
(if (not (exists "t:edit_text_succeeded"))
(message "For some reason, the config file editing script (EditText.rexx) could not complete successfully. You'll need to edit your amitcp:db/services file yourself. Look in the 'Installation' section of the AmiPhone docs for instructions."))
(prompt "\nAlso, the line:\n\nAmiPhone stream tcp nowait root amitcp:serv/AmiPhoned\n\nneeds to be present in your amitcp:db/inetd.conf file. Do you wish me to update that file?\n(Note: AmiPhone will not receive connections if this line is not precisely as shown above!)")
(help "The inclusion of this line into amitcp:db/inetd.conf is done by an ARexx script which is smart enough to correctly edit previous installations. Also it will make a backup (to amitcp:db/inetd.conf.bak) before writing.")
(confirm)
)
(if (not (exists "t:edit_text_succeeded"))
(message "For some reason, the config file editing script (EditText.rexx) could not complete successfully. You'll need to edit your amitcp:db/inetd.conf file yourself. Look in the 'Installation' section of the AmiPhone docs for instructions."))
)
)
(message "\n\nAmiPhone is now installed.\nRe-start AmiTCP and try it out!")
)
(abort "\n\nAmiTCP does not appear to be set up on your system. (Specifically, the assign AmiTCP: has not been made) Because of this, I am unable to install AmiPhone. Please install AmiTCP and then try again.")